<include file="Public:header" />
<div id="zoneHeader">
    <h2>计划投放详细报表</h2>
</div><!--/#zoneHeader-->
<div id="zoneBody">
    <div id="zoneBodySearch">
        <form id="formSearch" action="?c={$Think.const.CONTROLLER_NAME}&a=index2">
            <input type="hidden" name="sort" />
            <input type="hidden" name="sortdir" />

            <ul>
                <li><b>日期：</b><input type="text" name="day" class="fW100p" t="datebox"></li>
                <li><b>站长编号：</b><input type="text" name="uid" class="fW80p" /></li>
                <li>
                    <b>所属计划：</b>
                    <select name="plan_id">
                        <volist name=":getPlanNameByDay($_GET['day'])" id="vo">
                        <option value="{$vo.plan_id}">#{$vo.plan_id}  {$vo.plan_name}</option>
                        </volist>
                    </select>
                </li>
                <li><button type="button" id="as" class="btnSearch">查询</button></li>
            </ul>
        </form>
    </div><!--/#zoneBodySearch-->
    <div id="zoneBodyContent">
<table class="table2">
    <thead>
    <tr>
        <th class="tAr">站长</th>
        <th class="tAr"><a href="javascript:;" sort="num">结算数</a></th>
        <th class="tAr"><a href="javascript:;" sort="deductin">扣点</a></th>
        <th class="tAr"><a href="javascript:;" sort="click">点/弹</a></th>
        <th class="tAr">电信</th>
        <th class="tAr">移动</th>
        <th class="tAr">联通</th>
        <th class="tAr">WIFI</th>
        <th class="tAr">4G</th>
        <th class="tAr">3G</th>
        <th class="tAr">ios</th>
        <th class="tAr">安卓</th>
        <th class="tAr"><a href="javascript:;" sort="reach">到</a></th>
        <th class="tAr" name="order" value="do2_href_click desc"><a href="javascript:;" sort="do2_href_click">二链点</a></th>
        <th class="tAr" name="order" value="do2_any_click desc"><a href="javascript:;" sort="do2_any_click">二点</a></th>
        <th class="tAr" name="order" value="do2_move_track desc"><a href="javascript:;" sort="do2_move_track">轨迹</a></th>
        <th class="tAr">时长</th>
        <th class="tAr"><a href="javascript:;" sort="new_user" title="新流量">新</a></th>
        <th></th>
    </tr>
    </thead>
    <tbody>
    <volist id="vo" name="page.record">
    <php>
        $_clickTotal = $vo['num'] + $vo['deduction'];

        $_click_scale              = getCtr($vo['view'], $vo['num']);
        $_r_searcher_scale         = getCtr($_clickTotal, $vo['r_searcher']);
        $_r_self_scale             = getCtr($_clickTotal, $vo['r_self']);
        $_r_other_scale            = getCtr($_clickTotal, $vo['r_other']);
        $_r_none_scale             = getCtr($_clickTotal, $vo['r_none']);
        $_device_1_scale           = getCtr($_clickTotal, $vo['device_1']);
        $_device_2_scale           = getCtr($_clickTotal, $vo['device_2']);
        $_device_3_scale           = getCtr($_clickTotal, $vo['device_3']);
        $_device_4_scale           = getCtr($_clickTotal, $vo['device_4']);
        $_browser_scale            = getCtr($_clickTotal, $vo['browser']);
        $_resolution_scale         = getCtr($_clickTotal, $vo['resolution']);
        $_show_click_11_scale      = getCtr($_clickTotal, $vo['show_click_11']);
        $_show_click_6_10_scale    = getCtr($_clickTotal, $vo['show_click_6_10']);
        $_show_click_5_scale       = getCtr($_clickTotal, $vo['show_click_5']);
        $_click_xy_none_scale      = getCtr($_clickTotal, $vo['click_xy_none']);
        $_move_track_none_scale    = getCtr($_clickTotal, $vo['move_track_none']);
        $_click_xy_minus_scale     = getCtr($_clickTotal, $vo['click_xy_minus']);
        $_move_track_minus_scale   = getCtr($_clickTotal, $vo['move_track_minus']);
        $_move_track_scale         = getCtr($_clickTotal, $vo['move_track']);
        $_do2_href_click_scale     = getCtr($_clickTotal, $vo['do2_href_click']);
        $_do2_any_click_scale      = getCtr($_clickTotal, $vo['do2_any_click']);
        $_do2_move_track_scale     = getCtr($_clickTotal, $vo['do2_move_track']);
        $_do2_visit_time_len_scale = getCtr($_clickTotal, $vo['do2_visit_time_len']);
        $_reach_scale              = getCtr($_clickTotal, $vo['reach']);
        $_p_flash_scale            = getCtr($_clickTotal, $vo['p_flash']);
        $_p_alexa_scale            = getCtr($_clickTotal, $vo['p_alexa']);
        $_p_net_scale              = getCtr($_clickTotal, $vo['p_net']);
        $_new_user_scale           = getCtr($_clickTotal, $vo['new_user']);
        $_click3_scale             = getCtr($_clickTotal, $vo['click3']);

        /**
         * 运营商
         */
        $_ispTotal    = $vo['opt_1'] + $vo['opt_2'] + $vo['opt_3'] + $vo['opt_4'];
        $_opt_1_scale = getCtr($_ispTotal, $vo['opt_1']);   //电信
        $_opt_2_scale = getCtr($_ispTotal, $vo['opt_2']);   //移动
        $_opt_3_scale = getCtr($_ispTotal, $vo['opt_3']);   //联通
        $_opt_4_scale = getCtr($_ispTotal, $vo['opt_4']);   //其他

        /**
         * 联网类型
         */
        $_netTypeTotal = $vo['opt_5'] + $vo['opt_6'] + $vo['opt_7'] + $vo['opt_8'];
        $_opt_5_scale  = getCtr($_netTypeTotal, $vo['opt_5']);   //wifi
        $_opt_6_scale  = getCtr($_netTypeTotal, $vo['opt_6']);   //4g
        $_opt_7_scale  = getCtr($_netTypeTotal, $vo['opt_7']);   //3g
        $_opt_8_scale  = getCtr($_netTypeTotal, $vo['opt_8']);   //其他

        /**
         * 手机系统类型
         */
        $_osTotal      = $vo['opt_9'] + $vo['opt_10'] + $vo['opt_11'];
        $_opt_9_scale  = getCtr($_osTotal, $vo['opt_9']);   //ios
        $_opt_10_scale = getCtr($_osTotal, $vo['opt_10']);  //android

    </php>
    <tr class="tAr">
        <td>
            <a href="?c=Siter&id={$vo.uid}" title="查询站长信息" target="_blank">{$vo.uid}</a><br />
            <a href="?c=SiterStats&day={$Think.get.day}&uid={$vo.uid}" title="查看站长报表" target="_blank">{:getSiterName($vo['uid'])}</a></td>
        <td title="结算数量"><a href="?c=ClickDetail&day={$Think.get.day}&uid={$vo.uid}&plan_id={$Think.get.plan_id}">{$vo.num}</a> </td>
        <td title="扣点数量">{$vo.deduction}</td>
        <td title="点击数量">{$vo.click}</td>
        <td title="电信流量比例">{$vo.opt_1}<p>{$_opt_1_scale}%</p></td>
        <td title="移动流量比例">{$vo.opt_2}<p>{$_opt_2_scale}%</p></td>
        <td title="联通流量比例">{$vo.opt_3}<p>{$_opt_3_scale}%</p></td>
        <td title="WIFI流量比例">{$vo.opt_5}<p>{$_opt_5_scale}%</p></td>
        <td title="4g流量比例">{$vo.opt_6}<p>{$_opt_6_scale}%</p></td>
        <td title="3g流量比例">{$vo.opt_7}<p>{$_opt_7_scale}%</p></td>
        <td title="ios流量比例">{$vo.opt_9}<p>{$_opt_9_scale}%</p></td>
        <td title="android流量比例">{$vo.opt_10}<p>{$_opt_10_scale}%</p></td>
        <td title="二次到达">{$vo.reach}<br/><span g="g_reach_scale">{$_reach_scale}</span>%</td>
        <td title="二次链接点击">{$vo.do2_href_click}<br/><span g="g_do2_href_click_scale">{$_do2_href_click_scale}</span>%</td>
        <td title="二次任意位置点击">{$vo.do2_any_click}<br/><span g="g_do2_any_click_scale">{$_do2_any_click_scale}</span>%</td>
        <td title="二次鼠标移动轨迹">{$vo.do2_move_track}<br/><span g="g_do2_move_track_scale">{$_do2_move_track_scale}</span>%</td>
        <td title="二次停留时长达到标准">{$vo.do2_visit_time_len}<br/><span g="g_do2_visit_time_len_scale">{$_do2_visit_time_len_scale}</span>%</td>
        <td title="新流量">{$vo.new_user}<br/><span g="g_new_user_scale">{$_new_user_scale}</span>%</td>
        <td><a href="?c=ZoneStats&day={$Think.get.day}&uid={$vo.uid}&plan_id={$vo.plan_id}">详</a></td>
    </tr>
    </volist>
    </tbody>
</table>
    </div><!--/#zoneBodyContent-->
</div><!--/#zoneBody-->
<div id="zoneFooter">{:W('Page/info', [$page])}</div><!--/#zoneFooter-->
<script type="text/javascript">
$(function(){
    checkStatsWarn();
})
</script>
<include file="Public:footer" />
